<?php
/**
 * Created by PhpStorm.
 * User: yf
 * Date: 2016/8/11
 * Time: 14:01
 */
namespace SDXApi\Model;
use Think\Model;

class WarehouseModel extends Model
{
    protected $tableName = 'warehouse';

    public function get_warehouse_address($wid){
        $warehouse_info = S('warehouse_info_'.$wid);
        if(empty($warehouse_info)){
            $map = array('id'=>$wid);
            $warehouse_info = $this->where($map)->find();
            if(!empty($warehouse_info)){
                S('warehouse_info_'.$wid,$warehouse_info,3600);
            }
        }
        return $warehouse_info;
    }
   
}